package uestc.lj.gulishop.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import uestc.lj.common.utils.PageUtils;
import uestc.lj.gulishop.product.entity.SkuInfoEntity;
import uestc.lj.gulishop.product.vo.SkuItemVO;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * sku信息
 *
 * @author crazlee
 * @email peterlee0@163.com
 * @date 2021-05-21 16:56:25
 */
public interface SkuInfoService extends IService<SkuInfoEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveSkuInfo(SkuInfoEntity skuInfoEntity);

    PageUtils queryPageByCondition(Map<String, Object> params);

    List<SkuInfoEntity> getSkusBySpuId(Long spuId);

    SkuItemVO getSkuItem(Long skuId) throws ExecutionException, InterruptedException;

    /**
     * 获取指定商品的最新价格
     * @param skuId
     * @return
     */
    BigDecimal getNewPrice(Long skuId);
}

